//
//  ZWHomeActivityModel.m
//  aixianfeng
//
//  Created by zhaowei on 17/5/4.
//  Copyright © 2017年 zhaowei. All rights reserved.
//

#import "ZWHomeActivityModel.h"
#import "ZWHomeManager.h"

@implementation ZWHomeActivityModel

- (instancetype)init {
    
    
    self = [super init];
    if (self) {
        
        [self setup];
        
    }
    return self;
    
}


- (void)setup {
    
    NSDictionary *activityDict = [_HomeManager requestHomeInfomation];
    NSArray *activityArr = activityDict[@"data"][@"act_info"][3][@"act_rows"];
    NSMutableArray *bigImageArr = [NSMutableArray array];
    
    NSMutableArray *titleNameArr = [NSMutableArray array];
    for (NSInteger i =0; i<5; i++) {
        [bigImageArr addObject:activityArr[i][@"activity"][@"img"]];
        
        [titleNameArr addObject:activityArr[i][@"category_detail"][@"name"]];

    }
    
    self.nameArr = titleNameArr.copy;
    self.imgUrlArr = bigImageArr.copy;
}

@end
